/**
 * Sample React Native App By Wyh
 * Created by wyh on 15/12/23.
 */
'use strict';

import React, {
  StyleSheet,
  Text,
  View,
  Animated,
  Image,
  PixelRatio,
  Platform,
  TextInput,
  ScrollView,
  Navigator,
} from 'react-native';

import {
  msg,
  mixins,
} from 'iflux-native';


import {QMBtnContainer, QMHeader} from 'qmkit';

import appStore from './store';


const StoreMixin = mixins.StoreMixin;

const WIDTH = require('Dimensions').get('window').width;
const HEIGHT = require('Dimensions').get('window').height;


const Home = React.createClass({
  mixins: [StoreMixin(appStore)],


  render() {

    const store = appStore.data();
    console.log('isOpen====' + store.get('isOpen'));

    return (

      <View style={{flex:1, backgroundColor: 'transparent'}}>
        <Image style={{top: 0, bottom: 0, left: 0, right: 0, position: 'absolute', width: WIDTH, height: HEIGHT}}
               source={require('img/login_background.png')}/>

        <View style={styles.header}>
          <Text>学习栗子</Text>
        </View>

        <View style={{flex: 1, backgroundColor: 'red'}}>
          <Text>1111</Text>

        </View>
        <View style={{flex: 1, backgroundColor: 'green'}}>
          <Text>222</Text>
        </View>


      </View>
    );
  },


});


const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'transparent',
  },
  header: {
    flexDirection: 'row',
    justifyContent: 'center',
    alignItems: 'center',
    height: 60,
    paddingTop: 20,
    backgroundColor: '#fff',
    borderBottomColor: 'lightgray',
    borderBottomWidth: 1 / PixelRatio.get()
  },

});

module.exports = Home;